import React, { Component } from "react";

class Home extends Component{
    constructor(){
        super()
        this.state={
            name:'Home',
            num:0
        }
    }
    tap(){
        this.setState({
            num:this.state.num+1
        })
    }
    render(){
        return(
            <div>
            {this.state.name}
            <button onClick={()=>{this.tap()}}>+</button>{this.state.num}  
            </div> 
        )
    }
}

export default Home;